package com.b511.swpu.cementbackend.repository;

import com.b511.swpu.cementbackend.dto.output.EmployeeManageOutDto;
import com.b511.swpu.cementbackend.entity.CM_WorkBaseInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface WorkBaseNewRepository  extends JpaRepository<CM_WorkBaseInfo,Long> , JpaSpecificationExecutor<CM_WorkBaseInfo> {
    @Query(value = "select distinct country from BA_WELL",nativeQuery = true)
    List<String> findCountry();

    @Query(value = "select distinct area from BA_WELL",nativeQuery = true)
    List<String> findArea();

    @Query(value = "select name from SYSM_Company",nativeQuery = true)
    List<String> findCompany();

    @Query(value = "select distinct block from BA_WELL",nativeQuery = true)
    List<String> findBlock();

    @Query(value = "select distinct OilField from BA_WELL",nativeQuery = true)
    List<String> findOilField();

    @Query(value = "select distinct WellType from BA_WELL",nativeQuery = true)
    List<String> findWellType();

    @Query(value = "select distinct WellSpacing from BA_WELL",nativeQuery = true)
    List<String> findWellSpacing();
}
